//
//  LSYNetUtil.h
//  LSYReader
//
//  Created by sam on 2018/3/23.
//  Copyright © 2018年 okwei. All rights reserved.
//

#import "HTMLKit.h"
#import "LSYBook.h"
#import "LSYChapter.h"
#import "LSYParseModel.h"
@interface LSYNetUtil : NSObject
+(NSString *)moreUrl:(id)data rule:(LSYParseModel *)rule relativeUrl:(NSURL *)url;
+(NSArray *)books:(id)data rule:(LSYParseModel *)rule relativeUrl:(NSURL *)url;
+(NSString*)chapterContent:(id)data rule:(LSYParseModel *)rule;
+(NSArray *)chapters:(id)data book:(LSYBook *)book relativeUrl:(NSURL *)url;
+(NSString *)chapterDetail:(id)data book:(LSYBook *)book relativeUrl:(NSURL *)url; 
+(NSString *)htmlString:(NSData *)data;
+(NSString *)ownerText:(HTMLNode *)node;

// cache check
+(BOOL)cachedChapter:(LSYChapter *)chapter;
+(NSString *)cacheChapterContent:(LSYChapter *)chapter;
// save content
+ (void)saveCahpterContent:(NSString *)content chapter:(LSYChapter *)chapter;
@end
